package com.jamal2362.apktool.task;

import android.content.Context;
import java.io.File;
import pxb.android.arsc.ArscDumper;
import com.jamal2362.apktool.R;
import com.jamal2362.apktool.fragment.files.Refreshable;
import android.util.Log;

public class ASTask extends AbstractTask
{
	private Context context;

	public ASTask(Context ctx, Refreshable refresh)
	{
		super(ctx, refresh);
		this.context = ctx;
	}

	@Override
	protected int getTitle()
	{
		return R.string.mantisplit;
	}

	@Override
	protected boolean process(File f)
	{
		try
		{
			ArscDumper.read(f, this);
		}
		catch (Exception e)
		{
			warning(R.string.text, Log.getStackTraceString(e));
		}
		info(R.string.text, context.getString(R.string.complete).toLowerCase());
		return true;
	}

	@Override
	protected boolean shouldShowFinishDialog()
	{
		return true;
	}

	@Override
	protected void onPostExecute(Boolean result)
	{
		super.onPostExecute(result);
	}
}
